home *** CD-ROM | disk | FTP | other *** search
/ Canadian Geographic Explorer / Canadian Geographic Explorer.iso / pc / eo.dxr / 00001.ls next >
Encoding:
Text File  |  1996-10-03  |  21.0 KB  |  727 lines

  1. global gCurrentLabel, gGizmo, gIdleAllowed, gExtFolderPath, gIsMac, gVoicePlaying, gLegendSprite, g3DIntroShown, gZoomObj
  2.  
  3. on startMovie
  4.   if objectp(gGizmo) then
  5.     disposeGizmo(gGizmo)
  6.     set gGizmo to 0
  7.   end if
  8.   set gIdleAllowed to 0
  9.   set gVoicePlaying to 0
  10.   set g3DIntroShown to 0
  11.   set gLegendSprite to 38
  12.   set gCurrentLabel to "CanadaMenu"
  13.   set the floatPrecision to 3
  14.   if the machineType = 256 then
  15.     set gIsMac to 0
  16.     set gExtFolderPath to the pathName & "EO_EXT\"
  17.   else
  18.     set gIsMac to 1
  19.     set gExtFolderPath to the pathName & "EO_EXT:"
  20.   end if
  21. end
  22.  
  23. on stopMovie
  24. end
  25.  
  26. on idle
  27.   if gIdleAllowed then
  28.     updateGizmo(gGizmo)
  29.   end if
  30. end
  31.  
  32. on returnMenu
  33.   if gCurrentLabel <> "CanadaMenu" then
  34.     sound stop 1
  35.     sound stop 2
  36.     puppetSound(0)
  37.     puppetSprite(20, 0)
  38.     turnLegend(#off)
  39.     set gCurrentLabel to "CanadaMenu"
  40.     set gVoicePlaying to 0
  41.     setCompassPict(gGizmo, #off)
  42.     unsetCursor(gGizmo)
  43.     if not gizmoOpened(gGizmo) then
  44.       expandGizmo(gGizmo, point(522, 121))
  45.     end if
  46.     if showToolDrawerState(gGizmo) then
  47.       closeToolDrawer(gGizmo)
  48.     end if
  49.     go("CanadaMenu")
  50.     set gIdleAllowed to 1
  51.   end if
  52. end
  53.  
  54. on handleSubMaps thisClickedLoc
  55.   set thisRegion to 0
  56.   if inside(thisClickedLoc, rect(131, 361, 152, 382)) then
  57.     set thisRegion to "Van"
  58.   else
  59.     if inside(thisClickedLoc, rect(280, 364, 301, 385)) then
  60.       set thisRegion to "RidingM"
  61.     else
  62.       if inside(thisClickedLoc, rect(302, 377, 323, 398)) then
  63.         set thisRegion to "RedRiver"
  64.       else
  65.         if inside(thisClickedLoc, rect(303, 120, 324, 141)) then
  66.           set thisRegion to "Corn"
  67.         else
  68.           if inside(thisClickedLoc, rect(330, 365, 351, 386)) then
  69.             set thisRegion to "RedLake"
  70.           else
  71.             if inside(thisClickedLoc, rect(406, 427, 427, 448)) then
  72.               set thisRegion to "LakeHur"
  73.             else
  74.               if inside(thisClickedLoc, rect(443, 399, 464, 420)) then
  75.                 set thisRegion to "CenOnt"
  76.               else
  77.                 if inside(thisClickedLoc, rect(445, 421, 466, 442)) then
  78.                   set thisRegion to "Toronto"
  79.                 else
  80.                   if inside(thisClickedLoc, rect(483, 368, 504, 389)) then
  81.                     set thisRegion to "Montreal"
  82.                   else
  83.                     exit
  84.                   end if
  85.                 end if
  86.               end if
  87.             end if
  88.           end if
  89.         end if
  90.       end if
  91.     end if
  92.   end if
  93.   set gCurrentLabel to thisRegion
  94.   playSound(member "E_NARRATION" of castLib "shared")
  95.   setLeftPanelBtn(gGizmo, 2, 1)
  96.   set gIdleAllowed to 0
  97.   if tellLeftBtnState(gGizmo, 3) = 1 then
  98.     set gVoicePlaying to 1
  99.     setCompassPict(gGizmo, #on, member (gCurrentLabel & "_stillP") of castLib "Internal")
  100.     go(thisRegion)
  101.     sound playFile 2, gExtFolderPath & gCurrentLabel
  102.     if not showHelpState(gGizmo) then
  103.       openHelpDrawer(gGizmo)
  104.     end if
  105.   else
  106.     set gVoicePlaying to 0
  107.     setCompassPict(gGizmo, #on, member (gCurrentLabel & "_LenTxt") of castLib "Internal")
  108.     putAreaName()
  109.     go(thisRegion)
  110.   end if
  111. end
  112.  
  113. on handle3Ds thisClickedLoc
  114.   set thisRegion to 0
  115.   if inside(thisClickedLoc, rect(18, 385, 68, 426)) then
  116.     set thisRegion to "CanadaRelief"
  117.     set thisName to "Canada Relief"
  118.   else
  119.     if inside(thisClickedLoc, rect(87, 349, 122, 379)) then
  120.       set thisRegion to "VancouverIsland"
  121.       set thisName to "Vancouver Island"
  122.     else
  123.       if inside(thisClickedLoc, rect(108, 175, 143, 205)) then
  124.         set thisRegion to "Yukon"
  125.         set thisName to "Yukon"
  126.       else
  127.         if inside(thisClickedLoc, rect(161, 361, 196, 391)) then
  128.           set thisRegion to "Oakanagan"
  129.           set thisName to "Oakanagan"
  130.         else
  131.           if inside(thisClickedLoc, rect(323, 73, 358, 103)) then
  132.             set thisRegion to "PolarBearPass"
  133.             set thisName to "Polar Bear Pass"
  134.           else
  135.             if inside(thisClickedLoc, rect(416, 317, 451, 347)) then
  136.               set thisRegion to "EastCan"
  137.               set thisName to "Eastern Canada"
  138.             else
  139.               if inside(thisClickedLoc, rect(468, 398, 503, 428)) then
  140.                 set thisRegion to "Ottawa"
  141.                 set thisName to "Ottawa"
  142.               else
  143.                 if inside(thisClickedLoc, rect(497, 337, 532, 367)) then
  144.                   set thisRegion to "Gaspesie"
  145.                   set thisName to "Gaspesie"
  146.                 end if
  147.               end if
  148.             end if
  149.           end if
  150.         end if
  151.       end if
  152.     end if
  153.   end if
  154.   if stringp(thisRegion) then
  155.     playSound(member "E_3DIMAGE" of castLib "shared")
  156.     if not g3DIntroShown then
  157.       set currentFrame to the frame
  158.       disappearGizmo(gGizmo)
  159.       play frame "3DIntro"
  160.       go(currentFrame)
  161.       expandGizmo(gGizmo, point(522, 121))
  162.     else
  163.       set g3DIntroShown to g3DIntroShown + 1
  164.     end if
  165.     set gCurrentLabel to thisRegion
  166.     setLeftPanelBtn(gGizmo, 2, 1)
  167.     set gIdleAllowed to 0
  168.     if (g3DIntroShown = 1) and (tellLeftBtnState(gGizmo, 3) = 1) then
  169.       setCompassPict(gGizmo, #on, member "Inf3D_stillP" of castLib "Internal")
  170.       go(thisRegion)
  171.       displayHelpInfo(gGizmo, "Robert Thirsk")
  172.       updateStage()
  173.       sound stop 2
  174.       sound playFile 2, gExtFolderPath & "Inf3D"
  175.       repeat while soundBusy(2)
  176.         if the mouseDown and rollOver(47) then
  177.           exit repeat
  178.         end if
  179.       end repeat
  180.       sound stop 2
  181.       setCompassPict(gGizmo, #on, member (gCurrentLabel & "_LenTxt") of castLib "Internal")
  182.     else
  183.       setCompassPict(gGizmo, #on, member (gCurrentLabel & "_LenTxt") of castLib "Internal")
  184.       go(thisRegion)
  185.     end if
  186.     if not showHelpState(gGizmo) then
  187.       openHelpDrawer(gGizmo)
  188.     end if
  189.     displayHelpInfo(gGizmo, thisName)
  190.   end if
  191. end
  192.  
  193. on handleFlies thisClickedLoc
  194.   set thisRegion to 0
  195.   if inside(thisClickedLoc, rect(90, 287, 139, 328)) then
  196.     set thisRegion to "BCFLY"
  197.   else
  198.     if inside(thisClickedLoc, rect(410, 404, 456, 448)) then
  199.       set thisRegion to "NIAFLY"
  200.     else
  201.       if inside(thisClickedLoc, rect(471, 305, 511, 358)) then
  202.         set thisRegion to "CRAFLY"
  203.       else
  204.         if inside(thisClickedLoc, rect(524, 345, 567, 398)) then
  205.           set thisRegion to "FUNDYFLY"
  206.         else
  207.           if inside(thisClickedLoc, rect(21, 426, 75, 471)) then
  208.             set thisRegion to "PCI"
  209.           end if
  210.         end if
  211.       end if
  212.     end if
  213.   end if
  214.   if thisRegion = "PCI" then
  215.     if stringp(thisRegion) then
  216.       set gCurrentLabel to thisRegion
  217.       setLeftPanelBtn(gGizmo, 2, 1)
  218.       set gIdleAllowed to 0
  219.       if gizmoOpened(gGizmo) then
  220.         shrinkGizmo(gGizmo)
  221.         setShrinkPos(gGizmo, point(597, 36))
  222.       end if
  223.       go(thisRegion)
  224.     end if
  225.   else
  226.     if thisRegion <> " " then
  227.       playVideo(thisRegion, #fly)
  228.     end if
  229.   end if
  230. end
  231.  
  232. on handleSat thisClickedLoc
  233.   set shouldGO to 0
  234.   if inside(thisClickedLoc, rect(479, 428, 521, 470)) then
  235.     set shouldGO to 1
  236.     set gCurrentLabel to "RadarSatInfo"
  237.     set thisSound to "InfRadar"
  238.   else
  239.     if inside(thisClickedLoc, rect(524, 428, 566, 470)) then
  240.       set shouldGO to 1
  241.       set gCurrentLabel to "LandSatInfo"
  242.       set thisSound to "InfLand"
  243.     else
  244.       if inside(thisClickedLoc, rect(569, 428, 611, 470)) then
  245.         set shouldGO to 1
  246.         set gCurrentLabel to "SpotInfo"
  247.         set thisSound to "InfSpot"
  248.       end if
  249.     end if
  250.   end if
  251.   if shouldGO then
  252.     playSound(member "E_SATELLITE" of castLib "shared")
  253.     setLeftPanelBtn(gGizmo, 2, 1)
  254.     set gIdleAllowed to 0
  255.     if gizmoOpened(gGizmo) then
  256.       shrinkGizmo(gGizmo)
  257.       setShrinkPos(gGizmo, point(597, 36))
  258.     end if
  259.     go(label(gCurrentLabel))
  260.     if tellLeftBtnState(gGizmo, 3) = 1 then
  261.       set gVoicePlaying to 1
  262.       sound playFile 2, gExtFolderPath & thisSound
  263.     else
  264.       set gVoicePlaying to 0
  265.     end if
  266.   end if
  267. end
  268.  
  269. on putAreaName
  270.   case gCurrentLabel of
  271.     "Van":
  272.       displayHelpInfo(gGizmo, "Vancouver")
  273.     "RidingM":
  274.       displayHelpInfo(gGizmo, "Riding Mountain")
  275.     "RedRiver":
  276.       displayHelpInfo(gGizmo, "Red River")
  277.     "Corn":
  278.       displayHelpInfo(gGizmo, "Cornwallis")
  279.     "RedLake":
  280.       displayHelpInfo(gGizmo, "Red Lake")
  281.     "LakeHur":
  282.       displayHelpInfo(gGizmo, "Lake Huron")
  283.     "CenOnt":
  284.       displayHelpInfo(gGizmo, "Central Ontario")
  285.     "Toronto":
  286.       displayHelpInfo(gGizmo, "Toronto")
  287.     "Montreal":
  288.       displayHelpInfo(gGizmo, "Montreal")
  289.   end case
  290. end
  291.  
  292. on handleQT thisClickedLoc
  293.   if inside(thisClickedLoc, rect(83, 428, 125, 470)) then
  294.     playVideo("V_SteveM", #astronaut)
  295.   else
  296.     if inside(thisClickedLoc, rect(128, 428, 170, 470)) then
  297.       playVideo("V_MarcG", #astronaut)
  298.     else
  299.       if inside(thisClickedLoc, rect(173, 428, 215, 470)) then
  300.         playVideo("V_ChrisH", #astronaut)
  301.       else
  302.         if inside(thisClickedLoc, rect(218, 428, 260, 470)) then
  303.           playVideo("V_JulieP", #astronaut)
  304.         else
  305.           if inside(thisClickedLoc, rect(263, 428, 305, 470)) then
  306.             playVideo("V_BobT", #astronaut)
  307.           else
  308.             if inside(thisClickedLoc, rect(308, 428, 350, 470)) then
  309.               playVideo("V_DaveW", #astronaut)
  310.             else
  311.               if inside(thisClickedLoc, rect(353, 428, 395, 470)) then
  312.                 playVideo("V_Bjarni", #astronaut)
  313.               end if
  314.             end if
  315.           end if
  316.         end if
  317.       end if
  318.     end if
  319.   end if
  320. end
  321.  
  322. on prepare3DIntroQT
  323.   set thisVideo to "bob_3D"
  324.   set gIdleAllowed to 0
  325.   stageCursorsOnOff(0)
  326.   set videoSprite to 38
  327.   puppetSprite(videoSprite, 1)
  328.   set the loc of sprite videoSprite to point(320, 270)
  329.   set the text of member "videoTextBox" of castLib "shared" to "3D Intro"
  330.   set the fileName of member "vdLink" of castLib "shared" to gExtFolderPath & thisVideo
  331.   set the member of sprite videoSprite to member "vdLink" of castLib "shared"
  332. end
  333.  
  334. on playVideo thisVideo, whichType
  335.   playSound(member "E_Astronaut" of castLib "shared")
  336.   set gIdleAllowed to 0
  337.   stageCursorsOnOff(0)
  338.   disappearGizmo(gGizmo)
  339.   if whichType = #astronaut then
  340.     go("video")
  341.   else
  342.     case thisVideo of
  343.       "BCFLY":
  344.         go("video2")
  345.       "NIAFLY":
  346.         go("video4")
  347.       "CRAFLY":
  348.         go("video3")
  349.       "FUNDYFLY":
  350.         go("video1")
  351.     end case
  352.   end if
  353.   set videoSprite to 38
  354.   puppetSprite(videoSprite, 1)
  355.   set the loc of sprite videoSprite to point(320, 270)
  356.   set the fileName of member "vdLink" of castLib "shared" to gExtFolderPath & thisVideo
  357.   set the member of sprite videoSprite to member "vdLink" of castLib "shared"
  358.   case thisVideo of
  359.     "V_MarcG":
  360.       set the text of member "videoTextBox" of castLib "shared" to "Marc Garneau"
  361.     "V_SteveM":
  362.       set the text of member "videoTextBox" of castLib "shared" to "Steve MacLean"
  363.     "V_ChrisH":
  364.       set the text of member "videoTextBox" of castLib "shared" to "Chris Hadfield"
  365.     "V_DaveW":
  366.       set the text of member "videoTextBox" of castLib "shared" to "Dave Williams"
  367.     "V_JulieP":
  368.       set the text of member "videoTextBox" of castLib "shared" to "Julie Payette"
  369.     "V_Bjarni":
  370.       set the text of member "videoTextBox" of castLib "shared" to "Bjarni Tryggvason"
  371.     "V_BobT":
  372.       set the text of member "videoTextBox" of castLib "shared" to "Robert Thirsk"
  373.     "BCFLY":
  374.       set the text of member "videoTextBox" of castLib "shared" to "Coastal Mountains"
  375.     "NIAFLY":
  376.       set the text of member "videoTextBox" of castLib "shared" to "Niagara Escarpment"
  377.     "CRAFLY":
  378.       set the text of member "videoTextBox" of castLib "shared" to "Crater Lake"
  379.     "FUNDYFLY":
  380.       set the text of member "videoTextBox" of castLib "shared" to "Northumberland"
  381.   end case
  382. end
  383.  
  384. on stopVideo
  385.   displayHelpInfo(gGizmo, " ")
  386.   set videoSprite to 38
  387.   set the locV of sprite videoSprite to 9999
  388.   updateStage()
  389.   puppetSprite(videoSprite, 0)
  390.   go(label("CanadaMenu") + 1)
  391.   expandGizmo(gGizmo, point(522, 121))
  392.   set gIdleAllowed to 1
  393.   stageCursorsOnOff(1)
  394.   unLoad()
  395. end
  396.  
  397. on checkDist pt1, pt2
  398.   case gCurrentLabel of
  399.     "Corn":
  400.       set thisScale to 0.15069886599103
  401.     "LakeHur":
  402.       set thisScale to 0.59999999999999998
  403.     "RidingM":
  404.       set thisScale to 0.15695301872973
  405.     "Van":
  406.       set thisScale to 0.035442140705299
  407.     "RedRiver":
  408.       set thisScale to 0.026972353337829
  409.     "RedLake":
  410.       set thisScale to 0.0416
  411.     "Montreal":
  412.       set thisScale to 0.069126414931306
  413.     "Toronto":
  414.       set thisScale to 0.042627397791126
  415.     "CenOnt":
  416.       set thisScale to 0.09917527925670699
  417.     otherwise:
  418.       displayHelpInfo(gGizmo, "Invalid map!")
  419.       exit
  420.   end case
  421.   set pixelDistSquare to (pt2 - pt1) * (pt2 - pt1)
  422.   set pixelDist to sqrt(float(getAt(pixelDistSquare, 1) + getAt(pixelDistSquare, 2)))
  423.   displayHelpInfo(gGizmo, string(thisScale * pixelDist) && "km")
  424. end
  425.  
  426. on stageCursorsOnOff onOff
  427.   if onOff then
  428.     set fCursor to [member "fingerCursor", member "fingerCursorMask"]
  429.     repeat with x = 2 to 6
  430.       set the cursor of sprite x to fCursor
  431.     end repeat
  432.     repeat with x = 39 to 48
  433.       set the cursor of sprite x to -1
  434.     end repeat
  435.   else
  436.     repeat with x = 2 to 6
  437.       set the cursor of sprite x to 0
  438.     end repeat
  439.     repeat with x = 39 to 48
  440.       set the cursor of sprite x to 0
  441.     end repeat
  442.   end if
  443. end
  444.  
  445. on showRollOverText thisSprite
  446.   if thisSprite = #null then
  447.     displayHelpInfo(gGizmo, " ")
  448.   end if
  449.   case gCurrentLabel of
  450.     "Van":
  451.       case thisSprite of
  452.         13:
  453.           displayHelpInfo(gGizmo, "Greater Vancouver")
  454.         14:
  455.           displayHelpInfo(gGizmo, "Agricultural Areas")
  456.         15:
  457.           displayHelpInfo(gGizmo, "Anchored Ships")
  458.         16:
  459.           displayHelpInfo(gGizmo, "City Center")
  460.         17:
  461.           displayHelpInfo(gGizmo, "Vancouver Airport")
  462.         18:
  463.           displayHelpInfo(gGizmo, "Fraser River Delta")
  464.       end case
  465.     "RidingM":
  466.       case thisSprite of
  467.         13:
  468.           displayHelpInfo(gGizmo, "Park Area")
  469.         14:
  470.           displayHelpInfo(gGizmo, "Crop Identification")
  471.         15:
  472.           displayHelpInfo(gGizmo, "Agricultural Fields")
  473.       end case
  474.     "RedRiver":
  475.       case thisSprite of
  476.         13:
  477.           displayHelpInfo(gGizmo, "Red River")
  478.         14:
  479.           displayHelpInfo(gGizmo, "Flood Area")
  480.         15:
  481.           displayHelpInfo(gGizmo, "Morris Manitoba")
  482.       end case
  483.     "Corn":
  484.       case thisSprite of
  485.         13:
  486.           displayHelpInfo(gGizmo, "Cloud Cover")
  487.         14:
  488.           displayHelpInfo(gGizmo, "Sea Ice")
  489.         15:
  490.           displayHelpInfo(gGizmo, "Geologic Formations")
  491.         16:
  492.           displayHelpInfo(gGizmo, "Geology Type")
  493.         17:
  494.           displayHelpInfo(gGizmo, "Mineral Deposits")
  495.       end case
  496.     "RedLake":
  497.       case thisSprite of
  498.         13:
  499.           displayHelpInfo(gGizmo, "Lakes")
  500.         14:
  501.           displayHelpInfo(gGizmo, "Forest Fire Scar")
  502.         15:
  503.           displayHelpInfo(gGizmo, "Forest Cutover")
  504.         16:
  505.           displayHelpInfo(gGizmo, "Regenerating Forest")
  506.         17:
  507.           displayHelpInfo(gGizmo, "Cutting Activity")
  508.       end case
  509.     "LakeHur":
  510.       case thisSprite of
  511.         13:
  512.           displayHelpInfo(gGizmo, "Ice Movement")
  513.         14:
  514.           displayHelpInfo(gGizmo, "Ice Edges")
  515.         15:
  516.           displayHelpInfo(gGizmo, "Open Water")
  517.         16:
  518.           displayHelpInfo(gGizmo, "Ice Floes")
  519.         17:
  520.           displayHelpInfo(gGizmo, "Sarnia, Ont.")
  521.       end case
  522.     "CenOnt":
  523.       case thisSprite of
  524.         13:
  525.           displayHelpInfo(gGizmo, "Peterborough, Ont.")
  526.         14:
  527.           displayHelpInfo(gGizmo, "Forest")
  528.         15:
  529.           displayHelpInfo(gGizmo, "Agricultural Areas")
  530.         16:
  531.           displayHelpInfo(gGizmo, "Open Pasture")
  532.         17:
  533.           displayHelpInfo(gGizmo, "Lake Ontario")
  534.         18:
  535.           displayHelpInfo(gGizmo, "Trent Severn")
  536.       end case
  537.     "Toronto":
  538.       case thisSprite of
  539.         13:
  540.           displayHelpInfo(gGizmo, "Toronto Island")
  541.         14:
  542.           displayHelpInfo(gGizmo, "Pearson Airport")
  543.         15:
  544.           displayHelpInfo(gGizmo, "Highway 401")
  545.         16:
  546.           displayHelpInfo(gGizmo, "Downtown Core")
  547.         17:
  548.           displayHelpInfo(gGizmo, "Highway 407")
  549.       end case
  550.     "Montreal":
  551.       case thisSprite of
  552.         13:
  553.           displayHelpInfo(gGizmo, "Laurentians Start")
  554.         14:
  555.           displayHelpInfo(gGizmo, "Agricultural Areas")
  556.         15:
  557.           displayHelpInfo(gGizmo, "Canadian Space Agency")
  558.         16:
  559.           displayHelpInfo(gGizmo, "Mount Royal")
  560.         17:
  561.           displayHelpInfo(gGizmo, "St. Lawrence Seaway")
  562.       end case
  563.   end case
  564. end
  565.  
  566. on showRollOverTextmain
  567.   case rollOver() of
  568.     2:
  569.       set thisPt to point(the mouseH, the mouseV)
  570.       if getAt(thisPt, 1) < 378 then
  571.         if inside(thisPt, rect(131, 361, 152, 382)) then
  572.           displayHelpInfo(gGizmo, "RADARSAT Image")
  573.         else
  574.           if inside(thisPt, rect(280, 364, 301, 385)) then
  575.             displayHelpInfo(gGizmo, "LANDSAT Image")
  576.           else
  577.             if inside(thisPt, rect(302, 377, 323, 398)) then
  578.               displayHelpInfo(gGizmo, "RADARSAT Image")
  579.             else
  580.               if inside(thisPt, rect(303, 120, 324, 141)) then
  581.                 displayHelpInfo(gGizmo, "LANDSAT Image")
  582.               else
  583.                 if inside(thisPt, rect(330, 365, 351, 386)) then
  584.                   displayHelpInfo(gGizmo, "LANDSAT Image")
  585.                 else
  586.                   displayHelpInfo(gGizmo, " ")
  587.                 end if
  588.               end if
  589.             end if
  590.           end if
  591.         end if
  592.       else
  593.         if inside(thisPt, rect(406, 427, 427, 448)) then
  594.           displayHelpInfo(gGizmo, "RADARSAT Image")
  595.         else
  596.           if inside(thisPt, rect(443, 399, 464, 420)) then
  597.             displayHelpInfo(gGizmo, "SPOT Image")
  598.           else
  599.             if inside(thisPt, rect(445, 421, 466, 442)) then
  600.               displayHelpInfo(gGizmo, "SPOT Image")
  601.             else
  602.               if inside(thisPt, rect(483, 368, 504, 389)) then
  603.                 displayHelpInfo(gGizmo, "SPOT Image")
  604.               else
  605.                 displayHelpInfo(gGizmo, " ")
  606.               end if
  607.             end if
  608.           end if
  609.         end if
  610.       end if
  611.     3:
  612.       displayHelpInfo(gGizmo, "3D Image")
  613.     4:
  614.       displayHelpInfo(gGizmo, "Fly")
  615.     5:
  616.       set thisPt to point(the mouseH, the mouseV)
  617.       if inside(thisPt, rect(83, 428, 125, 470)) then
  618.         displayHelpInfo(gGizmo, "Steve MacLean")
  619.       else
  620.         if inside(thisPt, rect(128, 428, 170, 470)) then
  621.           displayHelpInfo(gGizmo, "Marc Garneau")
  622.         else
  623.           if inside(thisPt, rect(173, 428, 215, 470)) then
  624.             displayHelpInfo(gGizmo, "Chris Hadfield")
  625.           else
  626.             if inside(thisPt, rect(218, 428, 260, 470)) then
  627.               displayHelpInfo(gGizmo, "Julie Payette")
  628.             else
  629.               if inside(thisPt, rect(263, 428, 305, 470)) then
  630.                 displayHelpInfo(gGizmo, "Robert Thirsk")
  631.               else
  632.                 if inside(thisPt, rect(308, 428, 350, 470)) then
  633.                   displayHelpInfo(gGizmo, "Dave Williams")
  634.                 else
  635.                   if inside(thisPt, rect(353, 428, 395, 470)) then
  636.                     displayHelpInfo(gGizmo, "Bjarni Tryggvason")
  637.                   else
  638.                     displayHelpInfo(gGizmo, " ")
  639.                   end if
  640.                 end if
  641.               end if
  642.             end if
  643.           end if
  644.         end if
  645.       end if
  646.     6:
  647.       set thisPt to point(the mouseH, the mouseV)
  648.       if inside(thisPt, rect(479, 428, 521, 470)) then
  649.         displayHelpInfo(gGizmo, "RADARSAT")
  650.       else
  651.         if inside(thisPt, rect(524, 428, 566, 470)) then
  652.           displayHelpInfo(gGizmo, "LANDSAT")
  653.         else
  654.           if inside(thisPt, rect(569, 428, 611, 470)) then
  655.             displayHelpInfo(gGizmo, "SPOT")
  656.           else
  657.             displayHelpInfo(gGizmo, " ")
  658.           end if
  659.         end if
  660.       end if
  661.   end case
  662. end
  663.  
  664. on toolActions thisTool
  665.   case thisTool of
  666.     "comp", "compE":
  667.       measureDistance(gGizmo)
  668.     "mag":
  669.       updatemagnifier()
  670.     otherwise:
  671.       dontPassEvent()
  672.   end case
  673. end
  674.  
  675. on startMagnify
  676.   set magScale to 2
  677.   set magSize to 120
  678.   if gIsMac then
  679.     openXLib("Magnifier XObject")
  680.     set gZoomObj to Magnifier(mnew, "Allen Hempfield", "EA1467842391")
  681.     gZoomObj(mSetCircleShape)
  682.     gZoomObj(mSetHeightWidth, magSize, magSize)
  683.     gZoomObj(mSetMagnification, magScale)
  684.   else
  685.     openXLib("c:\zoom\zoom")
  686.     set gZoomObj to Zoom(mnew, the stageRight - magSize, the stageBottom - magSize, magSize, magSize, 16, 0)
  687.     gZoomObj(mShape, 1)
  688.     gZoomObj(mScale, magScale)
  689.   end if
  690. end
  691.  
  692. on stopMagnify
  693.   if gIsMac then
  694.     gZoomObj(mdispose)
  695.     set gZoomObj to 0
  696.     closeXLib("Magnifier XObject")
  697.   else
  698.     gZoomObj(mdispose)
  699.     set gZoomObj to 0
  700.     closeXLib("c:\zoom\zoom")
  701.   end if
  702. end
  703.  
  704. on updatemagnifier
  705.   if gIsMac then
  706.     cursor(200)
  707.     gZoomObj(mFloatNew, the mouseH, the mouseV)
  708.     repeat while the stillDown
  709.       gZoomObj(mFloatRun, the mouseH, the mouseV)
  710.     end repeat
  711.     gZoomObj(mFloatDone)
  712.     cursor([member "magCursor" of castLib "Gizmo", member "magCursorMask" of castLib "Gizmo"])
  713.   else
  714.     gZoomObj(mStart)
  715.   end if
  716. end
  717.  
  718. on turnLegend onOff
  719.   if onOff = #on then
  720.     puppetSprite(gLegendSprite, 1)
  721.     set the loc of sprite gLegendSprite to point(640, 480)
  722.   else
  723.     puppetSprite(gLegendSprite, 0)
  724.   end if
  725.   updateStage()
  726. end
  727.